#define _GNU_SOURCE
#include "App_pool.h"
#include "unistd.h"

int task_func(void *arg)
{
    log_debug("线程函数(%d)执行，参数：%s", gettid(), (char *)arg);
    return 0;
}

int main()
{
    // 初始化线程池
    App_Pool_Init(5);

    // 注册任务
     for (size_t i = 0; i < 10; i++)
    {
        char *msg = malloc(10);
        sprintf(msg, "hello%ld", i);
        App_Pool_registerTask(task_func, msg);
    }
    sleep(1);

    // 销毁线程池
    App_Pool_destroy();

    
}